Image processing method and apparatus for displaying an image between two display screens

ABSTRACT

Disclosed is an image processing method. The method includes: determining that an original image is to be displayed on a dividing line between two display screens; acquiring a complete display picture of the original image, and calculating distances from boundaries of the original image to the dividing line; and adjusting a display position of the original image on the two display screens according to the distances, and displaying the complete display picture of the original image according to the adjusted display position. Further disclosed are an image processing apparatus, a storage medium and a processor.

CROSS-REFERENCE TO RELATED APPLICATIONS

This is a National Stage Application, filed under 35 U.S.C. 371, ofInternational Patent Application No. PCT/CN2018/095006, filed on Jul. 9,2018, which claims priority to Chinese patent application No.201710941751.7 filed on Oct. 11, 2017, contents of both of which areincorporated herein by reference in their entireties.

TECHNICAL FIELD

The present disclosure relates to the technical field of communicationsand, for example, to an image processing method and apparatus.

BACKGROUND

In the related art, since it is impossible to achieve seamlessconnection at the junction of two screens of a double-screen mobilephone, the image displayed at the gap between the two screens is notattractive in display, is inconvenient to operate and is poor in userexperience due to the existence of the gap. For example, 5 persons existin an image and a main character is in a gap between two screens anddivided to be displayed on two screens, or a main item is divided to bedisplayed on two screens, or in an application, for example a piano keyis just displayed at the gap between the two screens, or a displaypicture of a caller portrait is at the gap between the two screens,resulting in a very poor display effect and inconvenience for a user touse.

With the increasing popularity of the use of double-screen mobilephones, a higher requirement for image display will be imposed. Atpresent, in the case where the double-screen mobile phone is in alarge-screen mode, for processing of an image at the gap between the twoscreens, the image is displayed mainly on one of the screens rather thanenlarged for display on the two screens.

For example, for application of the photos, the common processing methodat present is to display preview images on one screen and a large imageof a clicked preview image on the other screen. In this way, the imagecan be avoided from being displayed at the gap between the two screens.This display method does not enlarge the image for display and isactually to display a large image on a single screen. For otherapplications, this processing method is also mainly used to display thecomplete image merely on one screen. However, this processing method hasobvious defects of failing to fully utilize the advantage of displayingan image on a large screen, still displaying an image by using a singlescreen and being incapable of displaying a complete image by usingdouble screens to achieve good visual effects.

SUMMARY

Embodiments of the present application provide an image processingmethod and apparatus.

An embodiment provides an image processing method. The method includes:determining that an original image is to be displayed on a dividing linebetween two display screens; acquiring a complete display picture of theoriginal image, and calculating distances from boundaries of theoriginal image to the dividing line; and adjusting a display position ofthe original image on the two display screens according to thedistances, and displaying the complete display picture of the originalimage according to the adjusted display position.

In an embodiment, the two display screens are a first display screen anda second display screen, respectively.

The step of determining that the original image is to be displayed onthe dividing line between the two display screens includes: plotting afirst filling area of a predetermined size on the first display screenand plotting a second filling area of a predetermined size on the seconddisplay screen; calculating similarity of a first pixel point in thefirst filling area and a second pixel point in the second filling area;and in response to determining that the similarity is smaller than apreset threshold value, determining that the original image is to bedisplayed on the dividing line between the first display screen and thesecond display screen.

In an embodiment, the first pixel point and the second pixel point arepixel points symmetrical with respect to the dividing line as a centerline.

In an embodiment, the step of acquiring the complete display picture ofthe original image includes: using an edge detection method to calculateedge areas of the original image on two sides of the dividing line,restore display pictures of the original image in the edge areas on thetwo sides of the dividing line, and splice the display pictures toobtain the complete display picture of the original image.

In an embodiment, the step of calculating the distances from theboundaries of the original image to the dividing line includes:separately determining a first boundary of the original image on a firstdisplay screen and a second boundary of the original image on a seconddisplay screen; and calculating a first farthest distance amongdistances from all pixel points on the first boundary to the dividingline, and calculating a second farthest distance among distances fromall pixel points on the second boundary to the dividing line.

In an embodiment, the step of adjusting the display position of theoriginal image on the two display screens according to the distances,and displaying the complete display picture of the original imageaccording to the adjusted display position include one of: moving,according to the calculated second farthest distance, the displayposition of the original image on the two display screens towards thefirst display screen by the second farthest distance so that thecomplete display picture of the original image is displayed on the firstdisplay screen; moving, according to the calculated first farthestdistance, the display position of the original image on the two displayscreens towards the second display screen by the first farthest distanceso that the complete display picture of the original image is displayedon the second display screen; zooming out the original image byD1/(D1+D2), and displaying the complete display picture of the originalimage on the first display screen; or zooming out the original image byD2/(D1+D2), and displaying the complete display picture of the originalimage on the second display screen; where D1 is the first farthestdistance and D2 is the second farthest distance.

Another embodiment of the present application provides an imageprocessing apparatus. The apparatus includes a determination module, acalculation module and an adjustment module. The determination module isconfigured to determine that an original image is to be displayed on adividing line between two display screens. The calculation module isconfigured to acquire a complete display picture of the original image,and calculate distances from boundaries of the original image to thedividing line. The adjustment module is configured to adjust a displayposition of the original image on the two display screens according tothe distances, and display the complete display picture of the originalimage according to the adjusted display position.

In an embodiment, the two display screens are a first display screen anda second display screen, respectively; the determination moduleincludes: a plotting unit, a first calculation unit, and a firstdetermination unit; the plotting unit is configured to plot a firstfilling area of a predetermined size on the first display screen andplot a second filling area of a predetermined size on the second displayscreen; the first calculation unit is configured to calculate similarityof a first pixel point in the first filling area and a second pixelpoint in the second filling area; and the first determination unit isconfigured to: in response to determining that the similarity is smallerthan a preset threshold value, determine that the original image is tobe displayed on the dividing line between the first display screen andthe second display screen.

In an embodiment, the original image is a partial image included in alarge-screen display image and divided at the dividing line between thetwo display screens, and the large-screen display image is an imagedisplayed on the two display screens.

In an embodiment, the calculation module includes a second determinationunit and a second calculation unit. The second determination unit isconfigured to separately determine a first boundary of the originalimage on a first display screen and a second boundary of the originalimage on a second display screen; the second calculation unit isconfigured to calculate a first farthest distance among distances fromall pixel points on the first boundary to the dividing line, andcalculate a second farthest distance among distances from all pixelpoints on the second boundary to the dividing line.

In an embodiment, the adjustment module includes one of: a firstadjustment unit, a second adjustment unit, a third adjustment unit or afourth adjustment unit; the first adjustment unit is configured to movethe display position of the original image on the two display screenstowards the first display screen by the second farthest distanceaccording to the calculated second farthest distance so that thecomplete display picture of the original image is displayed on the firstdisplay screen; the second adjustment unit is configured to move thedisplay position of the original image on the two display screenstowards the second display screen by the first farthest distanceaccording to the calculated first farthest distance so that the completedisplay picture of the original image is displayed on the second displayscreen; the third adjustment unit is configured to zoom out the originalimage by D1/(D1+D2) and display the complete display picture of theoriginal image on the first display screen; the fourth adjustment unitis configured to zoom out the original image by D2/(D1+D2) and displaythe complete display picture of the original image on the second displayscreen; where D1 is the first farthest distance and D2 is the secondfarthest distance.

An embodiment further provides a storage medium. The storage medium isconfigured to store program codes for performing the steps describedbelow.

It is determined that an original image is to be displayed on a dividingline between two display screens.

A complete display picture of the original image is acquired, anddistances from boundaries of the original image to the dividing line arecalculated.

A display position of the original image on the two display screens isadjusted according to the distances, and the complete display picture ofthe original image is displayed according to the adjusted displayposition.

An embodiment further provides a processor. The processor is configuredto execute programs which, when executed, execute the method describedabove.

Herein, the complete picture of the original image is obtained throughcalculation and is displayed after the display position of the originalimage on the two display screens is adjusted, so that the original imageis displayed by avoiding the dividing line between the two displayscreens, and improving the user experience.

BRIEF DESCRIPTION OF DRAWINGS

The drawings described herein are used to provide a furtherunderstanding of the present application and form a part of the presentapplication. The exemplary embodiments and descriptions thereof in thepresent application are used to explain the present application and notto limit the present application in any improper way.

FIG. 1 is a block diagram of a hardware structure of a mobile terminalfor an image processing method according to an embodiment of the presentapplication;

FIG. 2 is a flowchart of an image processing method according to anembodiment of the present application;

FIG. 3 is a structural block diagram of an image processing apparatusaccording to an embodiment of the present application;

FIG. 4 is a structural diagram of a double-screen mobile phone accordingto an embodiment of the present application;

FIG. 5 is a structural block diagram of a system according to anembodiment of the present application;

FIG. 6 is a flowchart of an image processing method applied to doublescreens according to an embodiment of the present application;

FIG. 7 is a schematic diagram of a one-third filling area of two screensin a portrait manner according to an embodiment;

FIG. 8 is a schematic diagram of a one-third filling area of two screensin a landscape manner according to an embodiment;

FIG. 9 is a schematic diagram of pixel point coordinate calibration witha lower left corner as an origin of coordinates in a portrait modeaccording to an embodiment;

FIG. 10 is a schematic diagram of pixel point coordinate calibrationwith a lower left corner as an origin of coordinates in a landscape modeaccording to an embodiment;

FIG. 11 is a schematic diagram of selecting two points in coordinatesfor determination under a landscape operation according to anembodiment;

FIG. 12 is a schematic diagram of selecting two points in coordinatesfor determination under a portrait operation according to an embodiment;

FIG. 13 is a grayscale change diagram of a step change according to anembodiment;

FIG. 14 is a grayscale change diagram of a roof change according to anembodiment;

FIG. 15 shows an original image and effect diagrams of the originalimage processed by various edge detection operators according to anembodiment;

FIG. 16 is a schematic diagram of calculating distances between an imageon two screens and a gap according to an embodiment;

FIG. 17 is a schematic diagram of display in accordance with translationprocessing according to an embodiment; and

FIG. 18 is a schematic diagram of display in accordance with zoom-outprocessing according to an embodiment.

DETAILED DESCRIPTION

Embodiments of the present application will be described hereinafter indetail with reference to the drawings and in conjunction withembodiments.

In an embodiment, the terms “first”, “second” and the like in thedescription, claims and above drawings of the present application areused to distinguish between similar objects and are not necessarily usedto describe a particular order or sequence.

Embodiment One

A method embodiment provided by embodiment one of the presentapplication may be executed in a mobile terminal, a computer terminal orother similar computing apparatuses. Taking the method to be executed inthe mobile terminal as an example, FIG. 1 is a block diagram of ahardware structure of a mobile terminal for an image processing methodaccording to an embodiment of the present application. As shown in FIG.1, a mobile terminal 10 may include one or more (merely one is shown inthe figure) processors 102 (the processor 102 may include, but is notlimited to, a processing apparatus such as a micro controller unit (MCU)or a field-programmable gate array (FPGA)), a memory 104 configured tostore data, and a transmission apparatus 106 implementing acommunication function. It may be understood by those skilled in the artthat the structure shown in FIG. 1 is merely illustrative, and notintended to limit the structure of the electronic apparatus describedabove. For example, the mobile terminal 10 may further include more orfewer components than the components shown in FIG. 1, or may have aconfiguration different from the configuration shown in FIG. 1.

The memory 104 may be configured to store software programs and modulesof application software, such as program instructions/modulescorresponding to the image processing method in the embodiments of thepresent application. The processor 102 executes the software programsand modules stored in the memory 104 to perform multiple functionalapplications and data processing, that is, to implement the methoddescribed above. The memory 104 may include a high-speed random accessmemory, or may further include a nonvolatile memory such as one or moremagnetic storage apparatuses, flash memories or other nonvolatilesolid-state memories. In some examples, the memory 104 may furtherinclude memories that are disposed remote from the one or moreprocessors 102. These remote memories may be connected to the mobileterminal 10 via a network. Examples of the above network include, butare not limited to, the Internet, an intranet, a local area network, amobile communication network and a combination thereof.

The transmission apparatus 106 is configured to receive or send data viaa network. Specific examples of the above network may include a wirelessnetwork provided by a communication provider of the mobile terminal 10.In one example, the transmission apparatus 106 includes a networkinterface controller (NIC), which may be connected to other networkdevices via a base station and thus is capable of communicating with theInternet. In one example, the transmission apparatus 106 may be a radiofrequency (RF) module, and is configured to communicate with theInternet in a wireless way.

An embodiment provides an image processing method. FIG. 2 is a flowchartof an image processing method according to an embodiment of the presentapplication. As shown in FIG. 2, the process of the method includes thesteps described below.

In step S202, it is determined that an original image is to be displayedon a dividing line between two display screens, where the two displayscreens are a first display screen and a second screen, respectively.

In step S204, a complete picture of the original image is acquired, anddistances from boundaries of the original image to the dividing line arecalculated.

In step S206, a display position of the original image on the twodisplay screens is adjusted according to the distances.

Through the above steps, the complete picture of the original image isobtained through calculation and is displayed after the display positionof the original image on the two display screens is adjusted, so thatthe dividing line between the two display screens is avoided, andimproving the user experience.

In an embodiment, the above steps may, but may not necessarily, beexecuted by a terminal having at least two display screens.

In an embodiment, the step of determining that an original image is tobe displayed on a dividing line between two display screens includessteps described below.

In S11, a first filling area of a predetermined size is plotted on thefirst display screen and a second filling area of a predetermined sizeis plotted on the second display screen.

In S12, similarity of a first pixel point in the first filling area anda second pixel point in the second filling area is calculated.

In S13, in response to determining that the similarity is smaller than apreset threshold value, it is determined that the original image is tobe displayed on the dividing line between the two screens.

In an embodiment, the first pixel point and the second pixel point arepixel points symmetrical with respect to the dividing line as a centerline. The first pixel points or the second pixel points may be aplurality of adjacent pixel points, such as the same column or the samerow of pixel points.

In an embodiment, the step of acquiring the complete picture of theoriginal image includes using an edge detection method to perform thefollowing operations: calculating edge areas of the original image atthe dividing line, restoring pictures of the original image in the edgeareas, and splicing the pictures to obtain the complete picture of theoriginal image.

In an embodiment, the step of calculating the distances from theboundaries of the original image to the dividing line includes the stepsdescribed below.

In S21, a first boundary of the original image on a first display screenand a second boundary of the original image on a second display screenare determined separately.

In S22, a first farthest distance from the first boundary to thedividing line is calculated, and a second farthest distance from thesecond boundary to the dividing line is calculated.

In an embodiment, the step of adjusting the display position of theoriginal image on the two display screens according to the distances,which may be moving the display position or zooming out the originalimage, may include one of the following:

the display position of the original image on the two display screens ismoved towards the first display screen by the second farthest distance;

the display position of the original image on the two display screens ismoved towards the second display screen by the first farthest distance;

the original image is zoomed out by D1/(D1+D2), and then displayed onthe first display screen; or

the original image is zoomed out by D2/(D1+D2), and then displayed onthe second display screen.

D1 is the first farthest distance and D2 is the second farthestdistance.

From the description of the above-mentioned embodiments, it will beapparent to those skilled in the art that the methods in the embodimentsdescribed above may be implemented by software plus a necessarygeneral-purpose hardware platform, or may of course be implemented byhardware. Based on this understanding, the present applicationsubstantially, or the part making contributions, may be embodied in theform of a software product. The computer software product is stored in astorage medium (such as a read-only memory (ROM)/random access memory(RAM), a magnetic disk or an optical disk) and includes severalinstructions for enabling a terminal device (which may be a mobilephone, a computer, a server, a network device or the like) to executethe method according to one or more embodiments of the presentapplication.

Embodiment Two

An embodiment further provides an image processing apparatus. Theapparatus is configured to implement the above-mentioned embodiments andother embodiments. What has been described will not be repeated. As usedbelow, the term “module” may be software, hardware or a combinationthereof capable of implementing predetermined functions. The apparatusin the embodiment described below may be implemented by software, butimplementation by hardware or by a combination of software and hardwareis also possible and conceivable.

FIG. 3 is a structural block diagram of an image processing apparatusaccording to an embodiment of the present application. As shown in FIG.3, the apparatus includes a determination module 30, a calculationmodule 32 and an adjustment module 34.

The determination module 30 is configured to determine that an originalimage is to be displayed on a dividing line between two display screens,where the two display screens are a first display screen and a secondscreen, respectively.

The calculation module 32 is configured to acquire a complete picture ofthe original image, and calculate distances from boundaries of theoriginal image to the dividing line.

The adjustment module 34 is configured to adjust a display position ofthe original image on the two display screens according to thedistances.

In an embodiment, the determination module includes: a plotting unit, afirst calculation unit, and a first determination unit; the plottingunit is configured to plot a first filling area of a predetermined sizeon the first display screen and plot a second filling area of apredetermined size on the second display screen; the first calculationunit is configured to calculate similarity of a first pixel point in thefirst filling area and a second pixel point in the second filling area;the first determination unit is configured to: in response todetermining that the similarity is smaller than a preset thresholdvalue, determine that the original image is displayed on the dividingline between the two display screens.

In an embodiment, the calculation module includes a second determinationunit and a second calculation unit. The second determination unit isconfigured to separately determine a first boundary of the originalimage on a first display screen and a second boundary of the originalimage on a second display screen; the second calculation unit isconfigured to calculate a first farthest distance from the firstboundary to the dividing line, and calculate a second farthest distancefrom the second boundary to the dividing line.

In an embodiment, the adjustment module includes one of: a firstadjustment unit, a second adjustment unit, a third adjustment unit or afourth adjustment unit; the first adjustment unit is configured to movethe display position of the original image on the two display screenstowards the first display screen by the second farthest distance; thesecond adjustment unit is configured to move the display position of theoriginal image on the two display screens towards the second displayscreen by the first farthest distance; the third adjustment unit isconfigured to zoom out the original image by D1/(D1+D2) for display onthe first display screen; the fourth adjustment unit is configured tozoom out the original image by D2/(D1+D2) for display on the seconddisplay screen; where D1 is the first farthest distance and D2 is thesecond farthest distance.

In an embodiment, the one or more modules described above may beimplemented by software or hardware. Implementation by the hardware may,but may not necessarily, be performed in the following manner: the oneor more modules described above are located in the same processor orlocated in their respective processors in any combination form.

Embodiment Three

This embodiment is an embodiment of the present application, used fordescribing the present application in detail in conjunction withexamples.

The embodiment is directed to the double-screen image display from thedisplay on merely one screen without avoiding the gap to the display onthe large screen with the gap. As such, the present application usesarea plotting, coordinate system marking, image scanning, pixelcalculation, and a comparison of pixel values in the coordinate systemto preliminarily determine that in a large-screen mode, one image isdivided on two screens between which a gap exists, determine the dividedcomplete image by using edge detection, calculate the distances betweenthe divided image and the gap between the two screens by usingcoordinates, and move or zoom out the image according to the distances.According to the present disclosure, the image can be displayed on thelarge screen with the gap between the two screens avoided, the advantageof displaying the image on the large screen is achieved, and the defectthat a main character or item is divided by the gap between the twoscreens can be avoided.

With the wide use of double-screen mobile phones, the advantages ofdisplaying an image, a video and the like on a large screen are alsooutstanding, which is mainly applied in applications such as photos,camera, audio, video, and third-party games. These applications involvethe image division and display due to the existence of the gap betweentwo screens. The present application will use the following related art:the present application uses area plotting, coordinate system marking,image scanning, pixel calculation, and a comparison of pixel values inthe coordinate system to preliminarily determine that in a large-screenmode, one image is divided on two screens between which a gap exists,determine the divided complete image by using edge detection, calculatethe distances between the divided image and the gap between the twoscreens by using coordinates, and move or zoom out the image accordingto the distances.

For a double-screen terminal (terminal equipment can be turned over),since two screens cannot be seamlessly connected at the connection ofthe two screens, the image will be divided by the connection between thetwo screens for display, the display is not beautiful and the operationis not convenient. The current processing method mainly avoids theinfluence of division by displaying the double-screen image on a singlescreen, which also has obvious defects of failing to fully utilizeadvantages of a large screen.

An image processing method applied to double screens is provided herein.The image may be displayed on a large screen with the gap between thetwo screens avoided, the advantage of displaying the image on a largescreen can be embodied, and the defect of dividing a main character oritem by the gap between the two screens can be avoided.

FIG. 4 is a structural diagram of a double-screen mobile phone accordingto an embodiment of the present application.

Reference numeral 1 is defined as a sub-screen, reference numeral 3 isdefined as a main screen, and reference numeral 2 is defined as aconnecting apparatus connecting the main screen and the sub-screen. Thatis, two screens cannot be connected seamlessly due to the existence ofthe connecting apparatus 2 at present, and division occurs when an imageis displayed.

FIG. 5 is a structural block diagram of a system according to anembodiment of the present application. The system includes an imagedisplay module, an image determination module and an image processingmodule.

The image display module is configured to mainly acquire original imagedisplay information to be processed by one or more applications.

The image determination module performs two parts, i.e., preliminarydetermination and detailed determination, for the image. The preliminarydetermination includes four steps: 1) plotting areas on two screens; 2)marking coordinates of each pixel; 3) scanning the image of the plottedparts and calculating pixel values; and 4) comparing red green blue(RGB) pixel values of image on two screens according to the coordinatesystem. The detailed description of each step will be provided later.After the preliminary determination, in the part of the detaileddetermination, the complete image at the gap between the two screens isdetermined in an edge detection manner, and the content of the part isdescribed in detail later.

The image processing module is configured to process the determinedimage which is divided at the gap of two screens, and consider twooperation manners of moving and zooming out the image according todifferent application scenarios.

An embodiment provides an image processing method applied to doublescreens. FIG. 6 is a flowchart of an image processing method applied todouble screens according to an embodiment of the present application.

Details are described below.

In the first step, an original image to be processed is acquired.

In the embodiment, the original image to be processed is acquired, andthe image to be processed may be called out through photos, audio andvideo or other third-party applications.

In the second step, it is determined whether an image located at a gapbetween two screens needs to be processed.

In this step, it is determined whether a to-be-processed image exists inwhich a subject character or thing is divided, if the to-be-processedimage exists in which the subject character or thing is divided, theprocess goes to the next step, and if no to-be-processed image exists inwhich the subject character or thing is divided, normal display isperformed.

In the third step, how to preliminarily determine an image divided bythe gap between two screens is described below.

1) Area Plotting

One third of the areas from the connection of the two screens is plottedfor later calculation processing. The divided image is generally locatedin one third of the areas of the screens, if all the areas are selectedfor calculation, the amount of calculation is large, and if the selectedarea is too small, the divided image may not be completely included.FIG. 7 is a schematic diagram of a one-third filling area of two screensin a portrait manner according to an embodiment, and

FIG. 8 is a schematic diagram of a one-third filling area of two screensin a landscape manner according to an embodiment.

2) Coordinate System Marking

If the double-screen is operated in a portrait manner, the lower leftcorner is selected as an origin of coordinates to perform pixel pointcoordinate calibration, FIG. 9 is a schematic diagram of pixel pointcoordinate calibration with a lower left corner as an origin ofcoordinates in a portrait mode according to an embodiment, andcoordinate calibration is performed on each pixel in the one third areasat left and right; if the double-screen is operated in a landscapemanner, the lower left corner is also selected as an origin ofcoordinates to perform pixel calibration, and FIG. 10 is a schematicdiagram of pixel point coordinate calibration with a lower left corneras an origin of coordinates in a landscape mode according to anembodiment.

For example, FIG. 9 or FIG. 10 shows two coordinate points A and B atthe division of two screens, with the calibrated coordinates beingB(X_(B), Y_(B)) and A(X_(A), Y_(A)), respectively. Since the ordinatesof the two points A and B are located in the same position, Y_(A)=Y_(B)actually.

For example, for the two coordinate points A and B at the division oftwo screens shown in the above figure, the calibrated coordinates areB(X_(B), Y_(B)) and A(X_(A), Y_(A)), respectively. Since the abscissasof the two points A and B are located in the same position, X_(A)=X_(B)actually.

The calibration of the coordinate system as described above is preparedfor the subsequent comparison step.

3) Image Scanning and Pixel Calculation

Image scanning is performed on one third of the main screen andsub-screen at the position close to the connection between the mainscreen and the sub-screen, and the RGB value and the correspondingcoordinate value of each pixel are marked. In this step, the RGB valueof each pixel in one third of the two screens and the correspondingcoordinates are calibrated. Still taking the above figure as an example,it is assumed that the RGB value of point A is A(R_(A), G_(A), B_(A))and that the RGB value of point B is B(R_(B), G_(B), B_(B)) at thistime, and the RGB value of each pixel point is similarly calibrated.

4) Comparison

As for the landscape operation, the RGB values on two screens under thesame abscissa are compared, and the RGB values of several pixel pointsnear the points under the same abscissa on two screens are compared, andif it is found that the RGB values of the pixels on the left and rightsides of the points of two screens under the same abscissa are not verydifferent and that the pixel values of the points on the left and rightsides of the points under the same abscissa are not very different, itcan be preliminarily determined that a same image is divided on twoscreens. FIG. 11 is a schematic diagram of selecting two points incoordinates for determination under a landscape operation according toan embodiment. For the portrait operation, the RGB values under the sameordinate are compared in a similar manner.

The specific algorithm is as follows:r1=(R _(A) −R _(B))/256;g1=(G _(A) −G _(B))/256;b1=(B _(A) −B _(B))/256; anddiff1=sqrt(r1*r1+g1*g1+b1*b1).

Then other similarity values diff2, diff3 . . . diffn (n is the totalnumber of pixels under the same abscissa in one third of the screens)under the same abscissa as that of A and B are calculated in the abovemanner, where the sqrt( ) function is the square root, r1 is the colorvalue of a red color channel, g1 is the color value of a green colorchannel, and b1 is the color value of a blue color channel.S1=(diff1+diff2+ . . . diffn)/n; andSm=Threshold value.

The larger the value is, the smaller the similarity is. The smaller thevalue is, the greater the similarity is. S1 is the average similarity.

If S1≤Sm, images on the two sides of the dividing line are similar.

If S1>Sm, the images on the two sides of the dividing line are notsimilar.

Similarly, similarity values of pixels in several columns on the leftand right sides of two points A and B are determined, and if pixels ofthese columns on the left and right sides are also similar, it can bepreliminarily determined that a same image is divided on two screens.

For the portrait operation, the RGB values under the same ordinate arecompared in a similar manner as that in the method under the sameabscissa, and FIG. 12 is a schematic diagram of selecting two points incoordinates for determination under a portrait operation according to anembodiment.

In the fourth step, how to determine the to-be-processed complete imagelocated on the left screen and the right screen is described below.

Through the comparison in the previous step, it can be preliminarilydetermined that an image is divided by the two screens, then thecomplete image divided by the left side and the right side (upper sideand lower side in the landscape state) in the portrait state isdetermined, and the edges of the left image and the right image arecalculated through an edge detection method. The basic principle of theedge detection is to use an algorithm to highlight data elements withlarge numerical value change in the neighborhood of each piece of datain the array while shielding or reducing the grayscale display ofadjacent data elements with little change in the neighborhood.

Edge detection is a basic method in image processing and computervision, the purpose of edge detection is to identify points with obviousbrightness change in a digital image, the core of the edge detectionalgorithm is to highlight the rate of change in an image, edge detectionalgorithms can be divided into two categories: the first derivative mode(gradient operator) and the second derivative mode, and several commonedge detection operators in the first derivative mode are: the Robertsoperator, the Sobel operator, and the PreWitt operator. The common edgedetection operator in the second derivative mode is the laplacianoperator, and the specific edge detection algorithm is introduced asfollows:

an edge generally refers to an area where an image changes strongly inintensity locally. The change in intensity may have in the following twocases:

1. Step Change

FIG. 13 is a grayscale change diagram of a step change according to anembodiment, with the horizontal axis representing the spatial change,the vertical axis representing the grayscale change, and the dashed linerepresenting the edge: the diagram corresponding to the process of agradual change from dark to bright.

2. Roof Change

FIG. 14 is a grayscale change diagram of a roof change according to anembodiment, with the horizontal axis representing the spatial change,the vertical axis representing the grayscale change, and the dashed linerepresenting the edge, the diagram corresponding to the process fromdark to bright and then to dark.

The task of edge detection is to find a set of pixel points with a stepchange or a roof change. The basic principle of edge detection is asfollows: since the edge is the position where the grayscale changes mostviolently, the most intuitive idea is to perform differential.

For the first case, the peak value of the first-order differential isthe edge point, and the zero point of the second-order differential isthe edge point.

For the second case, the zero point of the first-order differential isthe edge point, and the peak value of the second-order differential isthe edge point.

With the first-order differential method, a gradient operator isdefined. The gradient is a vector indicating the direction in which thegrayscale of an image changes most violently.

${{\nabla f} = \left( {\frac{\partial f}{\partial x},\frac{\partial f}{\partial y}} \right)}.$

The magnitude of the gradient is as follows:

${{\nabla f}} = {\sqrt{\left( \frac{\partial f}{\partial x} \right)^{2} + \left( \frac{\partial f}{\partial\; y} \right)^{2}}.}$

The direction of the gradient is as follows:

${\theta = \left( \frac{{\partial f}/{\partial y}}{{\partial f}/{\partial x}} \right)}.$

$\frac{\partial f}{\partial x}$represents a partial derivative in the x direction,

$\frac{\partial f}{\partial\; y}$represents a partial derivative in the y direction, ∇f represents agradient, ∥∇f∥ represents the modulus of the gradient, θ represents agradient direction, x represents an abscissa of a pixel point, and yrepresents an ordinate of the pixel point. In actual image processing, adifference method can be used for calculation. However, if thedifference method is used to perform edge detection, the direction ofdifference and the direction of an edge have to be perpendicular to eachother, so the difference operation has to be performed on differentdirections of the image, which increases the amount of calculation.Edges can generally be divided into a horizontal edge, a vertical edge,and a diagonal edge.1. Roberts Operator

The Roberts gradient operator uses the difference between two adjacentpixel values in the diagonal direction as a measurement standard, andthe calculation method is as follows:G _(x) =f(i,j)−f(i−1,j−1)G _(y) =f(i−1,j)−f(i,j−1) and|G(x,y)|=√{square root over (G _(x) ² +G _(y) ²)}.

G_(x) and G_(y) represent crossover gradient operators and |G(x,y)|represents a gradient.

If written in the form of a convolution operation, the convolutionkernels are as follows:

$G_{x} = {{\begin{bmatrix}{- 1} & 0 \\0 & 1\end{bmatrix}\mspace{20mu} G_{y}} = {\begin{bmatrix}0 & {- 1} \\1 & 0\end{bmatrix}.}}$2. Prewitt Operator

The prewitt operator combines difference operation with neighborhoodaverage. The convolution template is as follows:

$G_{x} = {{\begin{bmatrix}{- 1} & 0 & 1 \\{- 1} & 0 & 1 \\{- 1} & 0 & 1\end{bmatrix}\mspace{14mu} G_{y}} = {\begin{bmatrix}{- 1} & {- 1} & {- 1} \\0 & 0 & 0 \\1 & 1 & 1\end{bmatrix}.}}$3. Sobel Operator

The sobel operator is similar to the prewitt operator, but consideringthat the influence degree of different adjacent pixels is different,weighted average is adopted. The convolution template is as follows:

$G_{x} = {{\begin{bmatrix}{- 1} & 0 & 1 \\{- 2} & 0 & 2 \\{- 1} & 0 & 1\end{bmatrix}\mspace{14mu} G_{y}} = {\begin{bmatrix}{- 1} & 2 & {- 1} \\0 & 0 & 0 \\1 & 2 & 1\end{bmatrix}.}}$4. Laplacian Operator

The laplacian operators are some operators using second-orderdifferentials, which are actually the divergence of gradients.

The second-order differential is as follows:

${\nabla^{2}f} = {\frac{\partial^{2}f}{\partial x^{2}} + {\frac{\partial^{2}f}{\partial y^{2}}\mspace{14mu}{while}}}$$\frac{\partial^{2}f}{\partial x^{2}} = {{f\left( {x,{y + 1}} \right)} - {2{f\left( {x,y} \right)}} + {{f\left( {x,{y - 1}} \right)}\mspace{14mu}{and}}}$$\frac{\partial^{2}f}{\partial y^{2}} = {{f\left( {{x + 1},y} \right)} - {2{f\left( {x,y} \right)}} + {{f\left( {{x - 1},y} \right)}.}}$

Therefore the convolution template is written as follows:

${\nabla^{2}f} \approx {\begin{pmatrix}0 & 1 & 0 \\1 & {- 4} & 1 \\0 & 1 & 0\end{pmatrix}.}$

$\frac{\partial^{2}f}{\partial x^{2}}$represents the second-order partial derivative in the X direction and

$\frac{\partial^{2}f}{\partial y^{2}}$represents the second-order partial derivative in the Y direction.

FIG. 15 shows an original image and effect diagrams of the originalimage processed by various edge detection operators according to anembodiment, where a corresponds to the original image, b1 corresponds tothe prewitt operator, b2 corresponds to the sobel operator, and b3corresponds to the laplacian operator.

The test results of the above edge detection are used.

Edges of the main to-be-processed image located at the gap between theleft and right screens are detected through the edge detectionalgorithm.

In the fifth step, distances between the image on the two screens andthe gap are calculated.

The image divided by the gap between the two screens is determinedthrough the previous two steps, and by taking the screen in the portraitmanner as an example, the distance between an image on the left screenand the middle (gap) of (between) screens is calculated, the D1 value ofthe longest distance is found out, the distance between an image on theright screen and the middle (gap) of (between) the screens is alsocalculated, and the D2 value of the longest distance is found out.

Taking the screen in a portrait manner as an example, if an edgedetection algorithm in the fourth step is used to have detected that thepixel point on the left screen farthest from the connection shaftbetween the two screens is C(X_(C), Y_(C)), and that the pixel point onthe right screen farthest from the connection shaft between the twoscreens is D(X_(D), Y_(D)), and M(X_(M), Y_(M)) are coordinates of apoint at the connection between the two screens, and if the ordinates ofthe two pixel points on the left screen and the right screen are notconsistent, the distance between the pixel point having the sameordinate as that of the pixel point at the connection between the twoscreens is calculated. FIG. 16 is a schematic diagram of calculatingdistances between an image on two screens and a gap according to anembodiment.

A distance from C to the middle of the two screens is calculated to beD1, and a distance from D to the middle of the two screens is calculatedto be D2.|D1|=√{square root over ((X _(C) −X _(M))²+(Y _(C) −Y _(M))²)}; and|D2|=√{square root over ((X _(D) −X _(M))²+(Y _(D) −Y _(M))²)}.

If it is determined that D1<D2, the divided image may be moved by adistance of D1.

Similarly, determination may also be performed in a similar way when thescreen is in a landscape manner.

In the sixth step, the image is translated or zoomed out throughdetermination.

The values of D1 and D2 are compared in the fifth step, the distancesfrom the divided image (such as a person or an item) to the middle ofthe two screens are determined, and the whole image is moved. If thevalue of D2 is large, the divided image may be uniformly moved towardsleft by a distance of D1, and may of course also be uniformly movedtowards right by a distance of D2. In comparison, the distance movedtowards left is short; therefore, it is suggested that a short-distancemovement is mainly adopted, and through the processing, the defect thata main character or an item is divided by a gap between two screens canbe avoided.

Alternatively, the image may also be zoomed out to avoid being dividedby a gap between two screens, the image is zoomed out by D1/(D1+D2) tobe placed on the left screen, or the image is zoomed out by D2/(D1+D2)to be placed on the right screen for display.

The user experience can be greatly improved. When an image is displayedon a double-screen large screen, the user can manually select atranslation mode or a zoom-out mode for display according to thedisplayed image. In the following two embodiments, an image is displayedaccording to the translation processing in the first embodiment, and animage is displayed according to the zoom-out processing in the secondembodiment.

FIG. 17 is a schematic diagram of display in accordance with translationprocessing according to an embodiment. Before being processed, the imageis the left image of FIG. 17; after being processed, the image is theright image of FIG. 17. After translation processing herein, the mainperson can be ensured to finally be displayed.

FIG. 18 is a schematic diagram of display in accordance with zoom-outprocessing according to an embodiment. The double-screen display of anoriginal image for an incoming call is shown on the left side of FIG.18, and the head of a person is divided into two sides. According to theembodiment, a user may perform processing and display in a translationmode or a zoom-out mode, and the user chooses to perform display in thezoom-out mode, as shown on the right side of FIG. 18.

As can be seen from FIGS. 17 and 18, the gap between two screens can bewell avoided, and the image divided by the gap between two screens canbe well displayed on the basis of the advantage that the large screen isfully utilized.

At present, an avoidance mode, which is mainly adopted for displaying animage on a large screen, has final processing of displaying the image ona single screen. For example, in the application of photos, a previewimage is mainly displayed on one screen and a complete large image isdisplayed on the other screen, so that the gap between two screens canbe avoided. Other applications also mainly adopt the avoidance mode toenable the image to be displayed merely on one screen, which also hasobvious defects. The advantages of a large screen are not fullyutilized, and the photo is still displayed on a single screen. Accordingto the embodiment, for double-screen image display, the image is notdisplayed merely on one screen and can be displayed on the large screenwith avoiding the gap between the two screens. According to the presentdisclosure, the image can be displayed on the large screen and the gapbetween the two screens is avoided, the advantage of displaying theimage on the large screen is embodied, and the defect that a maincharacter or item is divided by the gap between the two screens can beavoided.

According to the embodiment, the advantage of displaying an image on thedouble-screen large screen can be fully utilized, the defect that a maincharacter or item is divided by a gap between the two screens can beavoided, and no extra high cost needs to be added for the hardware usedin the embodiment.

The embodiment can be used in similar applications related to displayingan image, such as in applications of photos, audio and video, incomingcall portrait display, camera, game and the like in double-screenprojects.

Embodiment Four

An embodiment of the present application further provides a storagemedium. In the embodiment, the storage medium may be configured to storeprogram codes for performing the steps described below.

In S1, it is determined that an original image is to be displayed on adividing line between two display screens.

In S2, a complete display picture of the original image is acquired, anddistances from boundaries of the original image to the dividing line arecalculated.

In S3, a display position of the original image on the two displayscreens is adjusted according to the distances, and the complete displaypicture of the original image is displayed according to the adjusteddisplay position.

In this embodiment, the storage medium may include, but is not limitedto, a universal serial bus flash disk, a read-only memory (ROM), arandom access memory (RAM), a mobile hard disk, a magnetic disk, anoptical disk or another medium capable of storing program codes.

In the embodiment, a processor performs the following operationsaccording to the program codes stored in the storage medium.

It is determined that an original image is to be displayed on a dividingline between two display screens.

A complete display picture of the original image is acquired, anddistances from boundaries of the original image to the dividing line arecalculated.

A display position of the original image on the two display screens isadjusted according to the distances, and the complete display picture ofthe original image is displayed according to the adjusted displayposition.

For specific examples in the embodiment, reference may be made to theexamples described in the above-mentioned embodiments and optional otherembodiments, and repetition will not be made in the embodiment.

It is to be understood by those skilled in the art that each of theabove-mentioned modules or steps of the present application may beimplemented by a general-purpose computing apparatus, the modules orsteps may be concentrated on a single computing apparatus or distributedon a network composed of multiple computing apparatuses, the modules orsteps may be implemented by program codes executable by the computingapparatuses, so that the modules or steps may be stored in a storageapparatus and executed by the computing apparatuses. In somecircumstances, the illustrated or described steps may be executed insequences different from those described herein, or the modules or stepsmay be made into various integrated circuit modules separately, ormultiple modules or steps therein may be made into a single integratedcircuit module for implementation. In this way, the present applicationis not limited to any specific combination of hardware and software.

What is claimed is:
 1. An image processing method for displaying animage between two display screens, comprising: determining that anoriginal image is to be displayed on a dividing line between two displayscreens; acquiring a complete display picture of the original image, andcalculating distances from boundaries of the original image to thedividing line; and adjusting a display position of the original image onthe two display screens according to the distances, and displaying thecomplete display picture of the original image according to the adjusteddisplay position; wherein calculating the distances from the boundariesof the original image to the dividing line comprises: separatelydetermining a first boundary of the original image on a first displayscreen and a second boundary of the original image on a second displayscreen; and calculating a first farthest distance among distances fromall pixel points on the first boundary to the dividing line, andcalculating a second farthest distance among distances from all pixelpoints on the second boundary to the dividing line.
 2. The method ofclaim 1, wherein the original image is a partial image comprised in alarge-screen display image and divided at the dividing line between thetwo display screens, and the large-screen display image is an imagedisplayed on the two display screens.
 3. The method of claim 2, whereinthe two display screens are a first display screen and a second displayscreen, respectively; wherein determining that the original image is tobe displayed on the dividing line between the two display screenscomprises: plotting a first filling area of a predetermined size on thefirst display screen and plotting a second filling area of apredetermined size on the second display screen; calculating similarityof a first pixel point in the first filling area and a second pixelpoint in the second filling area; and in response to determining thatthe similarity is smaller than a preset threshold value, determiningthat the original image is to be displayed on the dividing line betweenthe first display screen and the second display screen.
 4. The method ofclaim 3, wherein the first pixel point and the second pixel point arepixel points symmetrical with respect to the dividing line as a centerline.
 5. The method of claim 2, wherein acquiring the complete displaypicture of the original image comprises: using an edge detection methodto calculate edge areas of the original image on two sides of thedividing line, restore display pictures of the original image in theedge areas on the two sides of the dividing line, and splice the displaypictures to obtain the complete display picture of the original image.6. The method of claim 2, wherein adjusting the display position of theoriginal image on the two display screens according to the distances,and displaying the complete display picture of the original imageaccording to the adjusted display position comprise one of: moving,according to the calculated second farthest distance, the displayposition of the original image on the two display screens towards thefirst display screen by the second farthest distance so that thecomplete display picture of the original image is displayed on the firstdisplay screen; moving, according to the calculated first farthestdistance, the display position of the original image on the two displayscreens towards the second display screen by the first farthest distanceso that the complete display picture of the original image is displayedon the second display screen; zooming out the original image byD1/(D1+D2), and displaying the complete display picture of the originalimage on the first display screen; or zooming out the original image byD2/(D1+D2), and displaying the complete display picture of the originalimage on the second display screen; wherein D1 is the first farthestdistance and D2 is the second farthest distance.
 7. The method of claim1, wherein the two display screens are a first display screen and asecond display screen, respectively; wherein determining that theoriginal image is to be displayed on the dividing line between the twodisplay screens comprises: plotting a first filling area of apredetermined size on the first display screen and plotting a secondfilling area of a predetermined size on the second display screen;calculating similarity of a first pixel point in the first filling areaand a second pixel point in the second filling area; and in response todetermining that the similarity is smaller than a preset thresholdvalue, determining that the original image is to be displayed on thedividing line between the first display screen and the second displayscreen.
 8. The method of claim 7, wherein the first pixel point and thesecond pixel point are pixel points symmetrical with respect to thedividing line as a center line.
 9. The method of claim 1, whereinacquiring the complete display picture of the original image comprises:using an edge detection method to calculate edge areas of the originalimage on two sides of the dividing line, restore display pictures of theoriginal image in the edge areas on the two sides of the dividing line,and splice the display pictures to obtain the complete display pictureof the original image.
 10. The method of claim 1, wherein adjusting thedisplay position of the original image on the two display screensaccording to the distances, and displaying the complete display pictureof the original image according to the adjusted display positioncomprise one of: moving, according to the calculated second farthestdistance, the display position of the original image on the two displayscreens towards the first display screen by the second farthest distanceso that the complete display picture of the original image is displayedon the first display screen; moving, according to the calculated firstfarthest distance, the display position of the original image on the twodisplay screens towards the second display screen by the first farthestdistance so that the complete display picture of the original image isdisplayed on the second display screen; zooming out the original imageby D1/(D1+D2), and displaying the complete display picture of theoriginal image on the first display screen; or zooming out the originalimage by D2/(D1+D2), and displaying the complete display picture of theoriginal image on the second display screen; wherein D1 is the firstfarthest distance and D2 is the second farthest distance.
 11. Aprocessor, which is configured to execute programs, and the programs areconfigured to, when executed by the processor, execute the method ofclaim
 1. 12. An image processing apparatus for displaying an imagebetween two display screens, comprising: a processor; and a memory forstoring instructions executable by the processor, wherein when executingthe instructions, the processor is configured to: determine that anoriginal image is to be displayed on a dividing line between two displayscreens; acquire a complete display picture of the original image, andcalculate distances from boundaries of the original image to thedividing line; and adjust a display position of the original image onthe two display screens according to the distances, and display thecomplete display picture of the original image according to the adjusteddisplay position; wherein the processor is further configured to:separately determine a first boundary of the original image on a firstdisplay screen and a second boundary of the original image on a seconddisplay screen; and calculate a first farthest distance among distancesfrom all pixel points on the first boundary to the dividing line, andcalculate a second farthest distance among distances from all pixelpoints on the second boundary to the dividing line.
 13. The apparatus ofclaim 12, wherein the original image is a partial image comprised in alarge-screen display image and divided at the dividing line between thetwo display screens, and the large-screen display image is an imagedisplayed on the two display screens.
 14. The apparatus of claim 12,wherein the two display screens are a first display screen and a seconddisplay screen, respectively; wherein the processor is configured to:plot a first filling area of a predetermined size on the first displayscreen and plot a second filling area of a predetermined size on thesecond display screen; calculate similarity of a first pixel point inthe first filling area and a second pixel point in the second fillingarea; and in response to determining that the similarity is smaller thana preset threshold value, determine that the original image is to bedisplayed on the dividing line between the first display screen and thesecond display screen.
 15. The apparatus of claim 12, wherein theprocessor is configured to use an edge detection method to calculateedge areas of the original image on two sides of the dividing line,restore display pictures of the original image in the edge areas on thetwo sides of the dividing line, and splice the display pictures toobtain the complete display picture of the original image.
 16. Theapparatus of claim 12, wherein the processor is configured to: move thedisplay position of the original image on the two display screenstowards the first display screen by the second farthest distanceaccording to the calculated second farthest distance so that thecomplete display picture of the original image is displayed on the firstdisplay screen; move the display position of the original image on thetwo display screens towards the second display screen by the firstfarthest distance according to the calculated first farthest distance sothat the complete display picture of the original image is displayed onthe second display screen; zoom out the original image by D1/(D1+D2) anddisplay the complete display picture of the original image on the firstdisplay screen; or zoom out the original image by D2/(D1+D2) and displaythe complete display picture of the original image on the second displayscreen; wherein D1 is the first farthest distance and D2 is the secondfarthest distance.
 17. A non-transitory computer-readable storage mediumfor storing computer programs, and the computer programs are configuredto, when executed by a processor, implement an image processing methodcomprising: determining that an original image is to be displayed on adividing line between two display screens; acquiring a complete displaypicture of the original image, and calculating distances from boundariesof the original image to the dividing line; and adjusting a displayposition of the original image on the two display screens according tothe distances, and displaying the complete display picture of theoriginal image according to the adjusted display position; whereincalculating the distances from the boundaries of the original image tothe dividing line comprises: separately determining a first boundary ofthe original image on a first display screen and a second boundary ofthe original image on a second display screen; and calculating a firstfarthest distance among distances from all pixel points on the firstboundary to the dividing line, and calculating a second farthestdistance among distances from all pixel points on the second boundary tothe dividing line.